package com.jy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jy.common.ResultInfo;
import com.jy.entity.Carport;
import com.jy.mapper.CarportMapper;
import com.jy.service.ICarportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 车位管理表 服务实现类
 * </p>
 *
 * @author xiexingxin
 * @since 2022-11-15
 */
@Service
public class CarportServiceImpl extends ServiceImpl<CarportMapper, Carport> implements ICarportService {

    @Autowired
    private CarportMapper carportMapper;
    
    @Override
    public List<Carport> getcarportInfo(String carportName) {
        return carportMapper.getcarportInfo(carportName);
    }
    

    @Override
    public Map getcarportWithperosonInfoById(Integer carportId) {
        return carportMapper.getcarportWithperosonInfoById(carportId);
    }

    @Override
    public List<Carport> list() {
        LambdaQueryWrapper<Carport> lambdaQueryWrapper = Wrappers.lambdaQuery();
        return carportMapper.selectList(lambdaQueryWrapper);
    }
}
